package com.qdlc.p2p.dal.model;

import org.springframework.beans.BeanUtils;

import com.qdlc.p2p.dal.dto.AdditionalFlowInvestor;

/**
 * 理财记录model
 * @author wjx
 * @version 2.0
 * @date 2015年5月16日 上午10:32:46
 */
public class FlowInvestorModel extends AdditionalFlowInvestor {
	
	//状态:1:成功，2:失败，3:结束（还款完成），0:初始化
	

	/**
	 * 初始化
	 */
	public static final byte INIT_STATUS = 0;
	
	/**
	 * 成功
	 */
	public static final byte SUCCESS_STATUS = 1;
	
	/**
	 * 失败
	 */
	public static final byte FAIL_STATUS = 2;
	
	
	/**
	 * 理财结束
	 */
	public static final byte END_STATUS = 3;
	
	/**
	 * 理财待收计划初始状态
	 */
	public static final byte YIELD_PLAN_INIT_STATUS=0;
	
	/**
	 * 理财待收计划已收回
	 */
	public static final byte YIELD_PLAN_REPAY_STATUS=1;
	
	private String userName;
	
	/**
	 * 借款项目uuid
	 */
	private String uuid;
	
	/**
	 * 
	 */
	private String projectName;
	
	/**
	 * 年化收益
	 */
	private double apr;
	
	/**
	 * 将基类封装到model中，创建model对象
	 * @param flowProject
	 * @return
	 */
	public static FlowInvestorModel instance(AdditionalFlowInvestor flowInvestor) {
		FlowInvestorModel flowInvestorModel = new FlowInvestorModel();
		BeanUtils.copyProperties(flowInvestor, flowInvestorModel);
		return flowInvestorModel;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public double getApr() {
		return apr;
	}

	public void setApr(double apr) {
		this.apr = apr;
	}
	
	

	
}
